/*
 Navicat Premium Data Transfer

 Source Server         : 本机数据库
 Source Server Type    : MySQL
 Source Server Version : 50722
 Source Host           : localhost:3306
 Source Schema         : java_advance

 Target Server Type    : MySQL
 Target Server Version : 50722
 File Encoding         : 65001

 Date: 15/04/2019 18:22:28
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_msg
-- ----------------------------
DROP TABLE IF EXISTS `t_msg`;
CREATE TABLE `t_msg` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `content` varchar(300) COLLATE utf8_bin DEFAULT NULL COMMENT '短信内容',
  `type` tinyint(2) DEFAULT NULL COMMENT '短信类型',
  `status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '短信状态',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_msg
-- ----------------------------
BEGIN;
INSERT INTO `t_msg` VALUES (4, '尊敬的15989550933用户，您的订单121123请尽快付款哦～', 1, 'wait_send', '2019-04-12 17:33:02');
INSERT INTO `t_msg` VALUES (5, '尊敬的15989550933用户，您的订单121123请尽快付款哦～', 1, 'wait_send', '2019-04-12 17:33:02');
COMMIT;

-- ----------------------------
-- Table structure for t_order
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
  `order_id` varchar(32) COLLATE utf8_bin NOT NULL COMMENT '订单编号',
  `trade_no` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '交易流水号',
  `pay_id` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '支付流水号',
  `pay_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '支付状态',
  `pay_type` tinyint(2) DEFAULT NULL COMMENT '支付方式',
  `pay_time` datetime DEFAULT NULL COMMENT '支付时间',
  `create_time` datetime DEFAULT NULL COMMENT '订单创建时间',
  `user_id` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '收件人',
  `close_time` varchar(11) COLLATE utf8_bin DEFAULT NULL COMMENT '订单关闭时间',
  `order_status` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT '订单状态',
  PRIMARY KEY (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Records of t_order
-- ----------------------------
BEGIN;
INSERT INTO `t_order` VALUES ('121123', NULL, '1234', 'wait_pay', NULL, NULL, '2019-04-12 17:33:02', '15989550933', NULL, 'wait_pay');
COMMIT;

-- ----------------------------
-- Table structure for t_pay
-- ----------------------------
DROP TABLE IF EXISTS `t_pay`;
CREATE TABLE `t_pay` (
  `pay_type` tinyint(2) NOT NULL COMMENT '支付方式ID',
  `pay_remark` varchar(0) COLLATE utf8_bin DEFAULT NULL COMMENT '支付方式描述',
  PRIMARY KEY (`pay_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
-- Table structure for t_ticket
-- ----------------------------
DROP TABLE IF EXISTS `t_ticket`;
CREATE TABLE `t_ticket` (
  `ticket_seq` varchar(20) COLLATE utf8_bin NOT NULL,
  `ticket_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '发车日期',
  `from_station` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '出发站',
  `to_station` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '到达站',
  `ticket_stock` int(11) DEFAULT NULL COMMENT '余票',
  PRIMARY KEY (`ticket_seq`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='缓存雪崩用的车票表';

-- ----------------------------
-- Records of t_ticket
-- ----------------------------
BEGIN;
INSERT INTO `t_ticket` VALUES ('G1', '2019-04-15 17:22:50', '北京南', '上海虹桥', 100);
INSERT INTO `t_ticket` VALUES ('G100', '2019-04-15 17:21:51', '深圳', '上海', 200);
INSERT INTO `t_ticket` VALUES ('G401', '2019-04-15 17:24:09', '北京西', '武汉', 100);
INSERT INTO `t_ticket` VALUES ('G405', '2019-04-15 17:24:52', '北京西', '武汉', 100);
INSERT INTO `t_ticket` VALUES ('G99', '2019-04-15 17:25:11', '上海', '深圳', 100);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
